<?php /* @var $this Controller */ ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta name="language" content="en" />
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        <?php Yii::app()->bootstrap->register(); ?>
        <link rel="stylesheet" type="text/css" href="<?php echo Yii::app()->theme->baseUrl; ?>/css/styles.css" />
    </head>

    <body>
        <div class="navbar navbar-fixed-top" id="header">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <div class="nav-collapse collapse">
                        <div class="pull-right btn-group navbar-text" id="out-button">
                            <a href="#" class="btn btn-warning">
                                <i class="icon-user icon-white"></i>
                                <?php echo Yii::app()->session['user_id']; ?>
                            </a>
                            <?php if (!Yii::app()->user->isGuest) { ?>
                                <a href="index.php?r=site/logout" class="btn btn-warning">Logout </a>
                                <?php
                            } else {
                                ?>
                                <a href="index.php?r=site/login" class="btn btn-warning">Login </a>
                                <?php
                            }
                            ?>
                        </div>
                        
						<ul class="nav">
                            <li><?php echo CHtml::link('Dashboard', '?r=site/index'); ?></li>
                            <li class="dropdown">
                                <a href="#"class="dropdown-toggle" id="dLabel1" role="button" data-toggle="dropdown" data-target="#">Front Office<b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><?php echo CHtml::link('Index', '?r=fo/act'); ?></li>
                                </ul>
                            </li>
							<li class="dropdown">
                                <a href="#"class="dropdown-toggle" id="dLabel1" role="button" data-toggle="dropdown" data-target="#">Back Office<b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><?php echo CHtml::link('Index', '?r=bo/'); ?></li>
                                </ul>
                            </li>
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" id="dLabel2" role="button" data-toggle="dropdown" data-target="#">Help<b class="caret"></b></a>
                                <ul class="dropdown-menu">
                                    <li><?php echo CHtml::link('About', '?r=site/page&view=about'); ?></li>
                                    <li><?php echo CHtml::link('Contact', '?r=site/contact'); ?></li>
                                </ul>
                            </li>

                        </ul>
						
                    </div>
                </div>
            </div>
        </div>

        <?php
        /*
          $this->widget('bootstrap.widgets.TbNavbar',array(
          'items'=>array(
          array(
          'class'=>'bootstrap.widgets.TbMenu',
          'items'=>array(
          array('label'=>'Dashboard', 'url'=>array('/site/index')),
          array('label'=>'Front', 'url'=>array('/fo')),
          array('label'=>'Back', 'url'=>array('/bo')),
          array('label'=>'Contact', 'url'=>array('/site/contact')),
          array('label'=>'About', 'url'=>array('/site/page', 'view'=>'about')),
          array('label'=>'Login', 'url'=>array('/site/login'), 'visible'=>Yii::app()->user->isGuest),
          array('label'=>'Logout ('.Yii::app()->user->name.')', 'url'=>array('/site/logout'), 'visible'=>!Yii::app()->user->isGuest)
          ),
          ),
          ),
          ));
         */
        ?>

        <div class="container" id="page">

            <?php
            if (isset($this->breadcrumbs)):
                ;
                $this->widget('application.components.BreadCrumb', array(
                    'firstCrumbName' => 'Home',
                    'newCrumb' =>
                    array(
                        'name' => isset($this->crumbTitle) ? $this->crumbTitle : $this->getPageTitle(),
                        'url' => array($_uri = str_replace("yii/antam_yii/index.php?r=", "", Yii::app()->request->requestUri)),
                    )
                ));

            endif
            ?>
            <!-- breadcrumbs -->
<?php echo $content; ?>
            <div class="clear"></div>

        </div><!-- page -->
        <br />
        <br />
        <br />
        <br />
        <?php
            $this->widget('application.extensions.CRegisterScript', array('functionName' => 'registerJqxTree'));
        ?>
        <!-- footer -->
        <div class="navbar navbar-fixed-bottom">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <div class="pagination-centered">
                        <p>	Copyright &copy; <?php echo date('Y'); ?> <br>by :: <b> RS Antam Medika </b><i>(OpenHealthCare)</i></p>
                    </div>
                </div>
            </div>
        </div>

    </body>
</html>
